<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../../resources/css/bootstrap/bootstrap.min.css">
    <link rel="stylesheet" href="../../resources/css/style.css">
    <link href="../../resources/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link rel="stylesheet" href="../../resources/css/plugins/bootstrap-table/bootstrap-table.css"/>
    <link rel="stylesheet" href="../../resources/css/pluginsExt/common.css">
    <link rel="stylesheet" href="../../resources/css/pluginsExt/integral/integralDetails.css">
</head>
<body>
<div class="white-bg row-fluid">
    <div class="row wrapper wrapper-content animated fadeInRight">
        <ul class="MemTop clearfix">
            <li class="Memlevel">
                <img src="../../resources/img/a6.jpg" alt="">
                <span class="myIntegral">
                        <b class="integral font24">
                            骑猪闯天下
                        </b>
                        <br>
                         <b class="integral font24">
                             18620906190
                         </b>
                    </span>
            </li>
            <li class="Memsur">
                用户积分: <b>2000</b>
            </li>
        </ul>
        <div class="panel-body">
            <form action="" id="formG">
                <div class="col-xs-5">
                    <input class="form-control intChange" required type="text" placeholder="请输入要增加/减少的积分值,减少请输入负数" name="applyName" id="applyName">
                </div>
                <div class="col-xs-6">
                    <input class="form-control intReason" required type="text" placeholder="请输入加减分理由" id="startApplyTime">
                </div>
                <div class="col-xs-1">
                    <input type="submit" class="btn btn-primary btnSave" value="保存">
                </div>
            </form>
        </div>
        <!--<div class="panel panel-default" style="/* margin-bottom: -10px */">-->
            <!--<div class="panel-heading">加减分</div>-->
            <!--<div class="panel-body">-->
                <!--<div class="col-xs-5">-->
                    <!--<input class="form-control" type="text" placeholder="申请人" id="applyName">-->
                <!--</div>-->
                <!--<div class="col-xs-3">-->
                    <!--<input class="form-control" type="text" placeholder="申请时间开始" id="startApplyTime">-->
                <!--</div>-->
                <!--<div class="col-xs-2">-->
                    <!--<input type="button" class="btn btn-primary" value="保存">-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->
                <table id="fullTab">
                    <thead>
                    <!--表头设置-->
                    <tr>
                        <th data-field="Name"  data-align="center">来源/用途</th>
                        <th data-field="Phone"  data-align="center">积分变化</th>
                        <th data-field="Gender"  data-align="center">状态</th>
                        <th data-field="curPoi" data-align="center" >日期</th>
                    </tr>
                    </thead>
                </table>
    </div>
</div>
</body>
<script src="../../resources/js/jquery-2.1.1.js"></script>
<script src="../../resources/js/bootstrap/bootstrap.min.js"></script>
<script src="../../resources/js/plugins/bootstrap-table/bootstrap-table.js"></script>
<script src="../../resources/js/plugins/bootstrap-table/bootstrap-table-zh-CN.js"></script>
<script src="../../resources/js/pluginsExt/bootstrapTable/tableExt.js"></script>
<script src="../../resources/js/plugins/layer/layer.js"></script>
<script src="../../resources/js/pluginsExt/layer/layerExt.js"></script>
<script src="../../resources/js/plugins/validate/jquery.validate.min.js"></script>
<script src="../../resources/js/plugins/validate/localization/messages_zh.js"></script>
<script>
    $(function () {
        //定义table
        var data=[{
            Name:'参加优茶线下活动',
            Phone:'+108',
            Gender:'待审核',
            curPoi:'1992-3-21 14:32:08',
        },{
            Name:'参加优茶线下活动',
            Phone:'+108',
            Gender:'待审核',
            curPoi:'1992-3-21 14:32:08',
        },{
            Name:'参加优茶线下活动',
            Phone:'+108',
            Gender:'待审核',
            curPoi:'1992-3-21 14:32:08',
        },{
            Name:'参加优茶线下活动',
            Phone:'+108',
            Gender:'待审核',
            curPoi:'1992-3-21 14:32:08',
        },{
            Name:'参加优茶线下活动',
            Phone:'+108',
            Gender:'待审核',
            curPoi:'1992-3-21 14:32:08',
        },{
            Name:'参加优茶线下活动',
            Phone:'+108',
            Gender:'待审核',
            curPoi:'1992-3-21 14:32:08',
        },{
            Name:'参加优茶线下活动',
            Phone:'+108',
            Gender:'待审核',
            curPoi:'1992-3-21 14:32:08',
        },{
            Name:'参加优茶线下活动',
            Phone:'+108',
            Gender:'待审核',
            curPoi:'1992-3-21 14:32:08',
        }]
        var fulltab=$('#fullTab');
        //初始化通用table,传入第一个参数table对象，第二个参数请求后台的url;
        initTable({
            obj:fulltab,
            data:data,
            height:$(window).height()-150
        });
        $('.btnSave').on('click',function(){
           var intChange =  $('.intChange').val();
           var intReason =  $('.intReason').val();
        })
        jQuery.validator.addMethod("negativeNum",
                function(value, element) {
                    return this.optional(element) || /^-?\d+(\.\d+)?$/.test(value);
                },
                "请输入正数或负数!")
        $('#formG').validate({
            rules:{
                applyName:{
                    negativeNum:true,
                }
            }
        })
    });

</script>
</html>